'''
Created on Apr 19, 2009

@author: Administrator
'''
from django.conf.urls.defaults import *
from django.conf import settings
from com.ericyang.common.web import redirect, page404, response

urlpatterns = patterns('',
    #create a new category
    (r'^category/view/(\d+)/?$', "com.ericyang.groupshopping.product.views.view_category"),
    
     #list sub categories
    (r'^category/sub/(\d+)/?$', "com.ericyang.groupshopping.product.views.view_sub_categories"),
                    
    #create a new category
    (r'^category/new/(\d+)/?$', "com.ericyang.groupshopping.product.views.create_category"),
    
    #edit a category
    (r'^category/([^/]+)/$', 'com.ericyang.groupshopping.product.views.change_category'),
    
    #delete a category
    (r'^category/([^/]+)/delete/?$', 'com.ericyang.groupshopping.product.views.delete_category'),
    
    #default to create a new category
    (r'^category/', "com.ericyang.groupshopping.product.views.create_category"),
    
    #view product
    (r'^view/([^/]+)/', "com.ericyang.groupshopping.product.views.view_product"),
    
    #create new product
    (r'^new/', "com.ericyang.groupshopping.product.views.create_product"),
    
    #create new product
    (r'^list/([^/]+)/', "com.ericyang.groupshopping.product.views.list_product"),
    
    #edit new product
    (r'^([^/]+)/delete/', "com.ericyang.groupshopping.product.views.delete_product"),
    
    #edit new product
    (r'^([^/]+)/', "com.ericyang.groupshopping.product.views.change_product"),
    
    #default page
    (r'^.*', "com.ericyang.groupshopping.product.views.index_product"),
)
